package com.sun.controller;

import com.mos.secure.ext.annotations.Desensitization;
import com.sun.entity.EnhanceProduct;
import com.sun.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {

    @Autowired
    private ProductService productService;

    @Desensitization
    @GetMapping("/all")
    public List<EnhanceProduct> findAll(){
      return  productService.list();
    }
}
